//合并排序

#include <stdio.h>
#include <string.h>
#include <stdlib.h>

int merge_sort( char *a , char *b , char *c );   
int main(int argc, char *argv[]) {  
          
    char a[100]={0};  
    char b[100]={0};  
    char c[200]={0};  
    gets(a);  
    gets(b);  
    merge_sort(a,b,c);  
    puts(c);
    return 0;  
}  

int merge_sort( char *a , char *b ,char *c )
{
	int lena,lenb,lenc;
	lena=strlen(a);
	lenb=strlen(b);
	for ( int i=0 ; i<=lena-1 ; i++ )
	{
		c[i] = a[i];
	}
	for ( int j=0 ; j<=lenb-1 ; j++ )
	{
		c[j+lena] = b[j];
	}
	lenc=strlen(c);
	char tem;
	for ( int i=0 ; i<lenc-1 ; i++)
	{
		for ( int j=0 ; j<lenc-i-1 ; j++ )
		{
			if ( c[j] > c[j+1] )
			{
				tem = c[j];
				c[j] = c[j+1];
				c[j+1] = tem;
			}
		}
	}
	return 0;
}





